//
//  NewTableViewCell.m
//  NeteaseNewsLY
//
//  Created by dllo on 16/1/26.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "NewTableViewCell.h"

@implementation NewTableViewCell
- (void)dealloc
{
    [_picture release];
    [_title release];
    [_updateTime release];
    [_commentsall release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picture = [[UIImageView alloc] init];
        [self.contentView addSubview:_picture];
        [_picture release];
        
        self.title = [[UILabel alloc] init];
        [self.contentView addSubview:_title];
        _title.numberOfLines = 0;
        [_title release];
        
        self.updateTime = [[UILabel alloc] init];
        [self.contentView addSubview:_updateTime];
        [_updateTime release];
        
        self.commentsall = [[UILabel alloc] init];
        [self.contentView addSubview:_commentsall];
        [_commentsall release];
        
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _picture.frame = CGRectMake(WIDTH * 10, HEIGHT * 15, WIDTH * 120, HEIGHT * 80);
    
    _title.frame = CGRectMake(WIDTH * 140, HEIGHT * 15, WIDTH * 220, HEIGHT * 50);
    _title.font = [UIFont systemFontOfSize: 15];
    
    _updateTime.frame = CGRectMake(WIDTH * 140, HEIGHT * 75, WIDTH * 75, HEIGHT * 25);
    _updateTime.font = [UIFont systemFontOfSize:12];
    _updateTime.textColor = [UIColor grayColor];
    
    _commentsall.frame = CGRectMake(WIDTH * 300, HEIGHT * 75, WIDTH * 75, HEIGHT * 25);
    _commentsall.font = [UIFont systemFontOfSize:12];

}


@end
